package com.cskaoyan.component;

import lombok.Data;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

/**
 * 有参构造方法来做注入
 * @author stone
 * @date 2022/12/20 15:42
 */
@Component
public class Component2 {
    DataSource dataSource;

    public Component2(@Qualifier("dataSource1") DataSource dataSource) {
        this.dataSource = dataSource;
    }
}
